package com.dependencies.thymeleaf.conroller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author zhizhou   2024/7/25 09:05
 */
@Controller
@RequestMapping("/")
public class IndexController {
    
    @GetMapping
    public String index(Model model){
        model.addAttribute("name", "Spring Boot 模板引擎 Thymeleaf");
        model.addAttribute("message", "调试成功");
        return "index";// 返回模板名称，不需要添加 .html 后缀
    }
}
